package com.yq.api.comm;

import java.io.Serializable;

/**
 * Created by yq on 16-5-26.
 */
public class ResultHandle<T> implements Serializable{
    private T resultContent;
    private String message;
    private Integer errorCode;
    private Boolean isSuccess = Boolean.TRUE;

    public T getResultContent() {
        return resultContent;
    }

    public void setResultContent(T resultContent) {
        this.resultContent = resultContent;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        isSuccess = Boolean.FALSE;
        this.message = message;
    }

    public Integer getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(Integer errorCode) {
        this.errorCode = errorCode;
    }

    public boolean isNull(){
        return resultContent == null;
    }

    public Boolean getSuccess() {
        return isSuccess;
    }

    public void setSuccess(Boolean success) {
        isSuccess = success;
    }
}
